const { http_request } = require("../../utils/request");
const {ifBind} = require("../../utils/api.js")

Page({
  data: {
    animationData: {},
  },

  // 页面导航到搜索页
  navigateToSearchPage() {
    // wx.setStorageSync('phoneNumber',"123");
    const phoneNumber = wx.getStorageSync('phoneNumber');
    console.info(phoneNumber);
    // 检查手机号是否为空
    if (phoneNumber === '') {
      wx.navigateTo({
        url: '../search/search',
      });
    } else {
     wx.navigateTo({
        url: '../search/search',
      });
    }
  },
  

  // 页面加载时执行的函数
  onLoad() {
    this.startAnimation();
  },

  // 启动动画
  startAnimation() {
    const animation = wx.createAnimation({
      duration: 1000, // 动画持续时间
      timingFunction: 'ease', // 定义动画的效果曲线
    });

    // 设置缩放动画效果
    animation.scale(1.2, 1.2).step();

    // 将动画数据绑定到页面上
    this.setData({ animationData: animation.export() });
  },
});
